<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <!-- 题目描述：使用Math对象，制作一个16进制的随机颜色

	题目提示：16进制包括 “ 0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15
                          0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F ”

	例： “#f23a4b”  -->

</body>
<script>
    
    var arr = [0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F']
    var newarr = []
    function getRandom(min, max) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    for (var i = 1; i <= 5; i++) {
        newarr.push(arr[getRandom(0, arr.length-1)])
    }
    
    var clo='#'+newarr.join('')
    console.log(clo);
</script>

</html>